package com.mywork.model.rowMapper;

import com.mywork.model.Student;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class StudentRowmapper implements RowMapper {

    @Override
    public Student mapRow(ResultSet rs, int i) throws SQLException {
        Student student = new Student();
        student.setName(rs.getString("name"));
        student.setNickName(rs.getString("nickName"));
        return student;
    }
}
